package edu.sias.question.mapper;

import edu.sias.question.domain.pojo.CourseAndCatalogId;
import edu.sias.question.domain.pojo.Question;
import edu.sias.question.domain.pojo.UserTopic;
import edu.sias.question.domain.vo.TopicVo;
import io.lettuce.core.dynamic.annotation.Param;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
@Mapper
public interface QuestionMapper {

    /**
     * 查询题库列表（分页）
     */



    /**
     * 查询精选题库列表（分页）
     */
    List<Question> selectClassicQuestionList();

    /**
     * 插入新题目
     */
    int insertQuestion(Question question);

    /**
     * 更新题目信息
     */
    int updateQuestion(Question question);

    /**
     * 修改题目为精选状态
     */
    int updateQuestionClassicStatus(@Param("id") int id);

    /**
     * 根据ID查询题目信息
     */
    Question selectQuestionById(Long id);

    @Delete("delete from t_question where id = #{id}")
    void deleteById(Long id);

    List<Question> selectQuestionList(String arg0, String arg1);
}
